package com.ruoyi.project.custom.service;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.custom.domain.CustomInfo;
import com.ruoyi.project.custom.domain.CustomOperator;
import com.ruoyi.project.custom.domain.vo.CustomAgreementVo;
import com.ruoyi.project.custom.domain.vo.HandoverParamVo;

import java.util.Date;
import java.util.List;

/**
 * 【请填写功能名称】Service接口
 * 
 * @author ruoyi
 * @date 2024-06-26
 */
public interface ICustomInfoService 
{
    /**
     * 查询【客户信息】详情
     * 
     * @param id
     * @return
     */
    public CustomInfo selectCustomInfoById(String id);

    /**
     * 查询【客户信息】列表
     * 
     * @param customInfo
     * @return
     */
    public List<CustomInfo> selectCustomInfoList(CustomInfo customInfo);

    /**
     * 查询公海客户
     * @param customInfo
     * @return
     */
    public List<CustomInfo> selectNotAllocatedCustomList(CustomInfo customInfo);

    /**
     * 查询我的签约客户
     * @return
     */
    public List<CustomInfo> selectMySignedCustomList(CustomInfo customInfo);

    public List<CustomAgreementVo> selectCustomAgreementList();

    CustomInfo selectCustomByName(String cusname);

    /**
     * 查询是否已使用指定的客户分组
     * @param groupId
     * @return
     */
    public int checkCustomExistGroup(Long groupId);

    /**
     * 查询是否存在相同的客户名称
     * @param customInfo
     * @return
     */
    public String checkCustomNameUnique(CustomInfo customInfo);

    int selectMyCustomCount(CustomInfo customInfo);

    List<CustomInfo> selectOperatorShop(CustomInfo customInfo);

    List<CustomInfo> selectLeaderShop(CustomInfo customInfo);

    List<CustomInfo> selectShopAccordOperator(CustomInfo customInfo);

    List<CustomInfo> selectOperationSummaryInitData(Date operStartDate, Date operEndDate);

    /**
     * 新增【客户信息】
     * 
     * @param customInfo
     * @return
     */
    public int insertCustomInfo(CustomInfo customInfo);

    /**
     * 运营人员篡创建客户
     * @param customInfo
     * @return
     */
    int insertCustomByOperator(CustomInfo customInfo);

    /**
     * 修改【客户信息】
     * 
     * @param customInfo
     * @return
     */
    public int updateCustomInfo(CustomInfo customInfo);

    int updateCustomOperStatus(CustomInfo customInfo);

    /**
     * 放入公海
     * @param id
     * @return
     */
    public int abanonCustomInfo(String[] ids, String reason);

    /**
     * 认领客户
     * @param ids
     * @return
     */
    public int claimCustomInfo(String[] ids);

    /**
     * 客户交接
     * @param handoverParamVo
     * @return
     */
    public int handoverCustomInfo(HandoverParamVo handoverParamVo);

    /**
     * 意向标签
     * @param ids
     * @return
     */
    public int intentCustom(String id) throws Exception;

    public int intentCustoms(String[] ids) throws Exception;

    /**
     * 客户签约
     * @param id
     * @return
     */
    public int signCustom(String id) throws Exception;

    public int signCustoms(String[] ids) throws Exception;

    /**
     * 批量删除【客户信息】
     * 
     * @param ids
     * @return
     */
    public int deleteCustomInfoByIds(String[] ids);

    /**
     * 删除【客户信息】信息
     * 
     * @param id
     * @return
     */
    public int deleteCustomInfoById(String id);

    /**
     * 分配运营人员
     * @param operators
     * @return
     */
    AjaxResult assignOperators(List<CustomOperator> operators);

    /**
     * 转交店铺
     * @param operators
     * @return
     */
    AjaxResult transferOperators(List<CustomOperator> operators) throws Exception;
}
